﻿#region Using Directives

    using System;
    using System.Collections.Generic;
    using System.Linq;
    using System.Text;

    using Csla;
using MarketPulse.BusinessLogic.Core;

#endregion

namespace MarketPulse.BusinessLogic.Common
{
    /// <summary>
    /// This class represents a read only instance of a Branch Attribute within the system.
    /// </summary>
    [Serializable]
    [Csla.Server.ObjectFactory("MarketPulse.BusinessLogic.DataAccess.LinqSProcBranchFactory, DataAccess", "FetchAttributeInfo")]
    public class BranchAttributeInfo : MarketPulseReadOnlyBase<BranchAttributeInfo>
    {

        #region Constructors

            /// <summary>
            /// Default constructor for this class, marked as private in order to (try to) enforce construction
            /// only via the static factory methods provided.
            /// </summary>
            private BranchAttributeInfo()
            {
            }

        #endregion         

        #region Properties

            /// <summary>
            /// The ID of the associated Branch 
            /// </summary>
            public static PropertyInfo<Nullable<Guid>> BranchGUIDProperty = RegisterProperty<Nullable<Guid>>(p => p.BranchGUID);
            /// <summary>
            /// The ID of the associated Branch 
            /// </summary>
            public Nullable<Guid> BranchGUID
            {
                get { return GetProperty(BranchGUIDProperty); }                
            }

            /// <summary>
            /// The GUID of the associated BranchAttributeType
            /// </summary>
            public static PropertyInfo<Nullable<Guid>> BranchAttributeTypeGUIDProperty = RegisterProperty<Nullable<Guid>>(p => p.BranchAttributeTypeGUID);
            /// <summary>
            /// The GUID of the associated BranchAttributeType
            /// </summary>
            public Nullable<Guid> BranchAttributeTypeGUID
            {
                get { return GetProperty(BranchAttributeTypeGUIDProperty); }                
            }

            /// <summary>
            /// A human readable name for this Branch Attribute
            /// </summary>
            public static PropertyInfo<string> BranchAttributeNameProperty = RegisterProperty<string>(p => p.Name);
            /// <summary>
            /// A human readable name for this Branch Attribute
            /// </summary>
            public string Name
            {
                get { return GetProperty(BranchAttributeNameProperty); }                
            }

        #endregion
    }
}
